package ysq.xyg.recovery.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 回收金模块-袋子记录表实体类
 *
 * @author congcong tao
 * @date 2019-7-8 14:46:54
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_recovery_sack_record")
public class RecoverySackRecord implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * stackMemberId
     */ 
	@Column(name = "sack_member_id")
	private String sackMemberId;

	/**
     * stackNum
     */ 
	@Column(name = "stack_num")
	private String stackNum;

	/**
     * 用户
     */ 
	@Column(name = "member_id")
	private String memberId;

	/**
	 * 用户地址
	 */
	@Column(name = "member_address")
	private String memberAddress;

	@Column(name = "member_phone")
	private String memberPhone;

	/**
     * 收货人
     */ 
	@Column(name = "member_cover_id")
	private String memberCoverId;

	/**
     * 收货人手机号
     */ 
	@Column(name = "member_cover_phone")
	private String memberCoverPhone;

	/**
     * 编号
     */ 
	@Column(name = "number")
	private String number;

	/**
     * 二维码路径
     */ 
	@Column(name = "qr_image")
	private String qrImage;

	/**
     * 内容
     */ 
	@Column(name = "content")
	private String content;

	/**
     * 状态1、待处理2、待盘点，3盘点完成
     */ 
	@Column(name = "status")
	private String status;

	/**
	 * 袋子状态1=未使用2=已使用
	 */
	@Column(name = "sack_status")
	private String sackStatus;

	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
	 * 处理时间
	 */
	@Column(name = "manage_time")
	private Date manageTime;

	@Transient
	private String memberNickName;

	@Transient
	private String memberCardNo;

	@Transient
	private String memberName;

	@Transient
	private String memberPhoner;

	@Transient
	private String memberCoverNickName;

	@Transient
	private String createTimeStr;

	@Transient
	private String manageTimeStr;

	public RecoverySackRecord(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}